package com.cykj.faceledtv.entity;


/**
 * netty tcp 发送消息实体类
 *
 * @author jzh
 * @date 2018/11/06 14:40
 */
public class NettySendMsgModel {
    /**
     * 发送的数据类型
     */
    public enum SendType {
        /**
         * 登录
         */
        LOGIN,
        /**
         * 心跳
         */
        HEART,
        /**
         * json数据
         */
        DATA
    }

    private SendType type;

    /**
     * 要发送的数据
     */
    private String sendMsg;
    /**
     * 发送的二进制数据
     */
    private byte[] sendByteData;

    public SendType getType() {
        return type;
    }

    public void setType(SendType type) {
        this.type = type;
    }


    public String getSendMsg() {
        return sendMsg;
    }

    public void setSendMsg(String sendMsg) {
        this.sendMsg = sendMsg;
    }

    public byte[] getSendByteData() {
        return sendByteData;
    }

    public void setSendByteData(byte[] sendByteData) {
        this.sendByteData = sendByteData;
    }

    public NettySendMsgModel(SendType type, String sendMsg) {
        this.type = type;
        this.sendMsg = sendMsg;
    }

    public NettySendMsgModel(SendType type, byte[] sendByteData) {
        this.type = type;
        this.sendByteData = sendByteData;
    }

    public NettySendMsgModel(SendType type) {
        this.type = type;
    }

}
